package basic;

import java.util.Scanner;

public class Xunhuanlianxi {
	public static void main(String[] args) {
		double s;
		int i,n;
	Scanner in=new Scanner(System.in);
	System.out.println("请输入一个数：");
	n=in.nextInt();
	s=1;
    i=1;
		while(i<=n){
			s=s*i;
			i++;
		}
		System.out.println("阶乘为："+s);
	}

}
